var app = getApp();

Page({
    data: {
        imgUrl:app.globalData.imgUrl,
        status: "",  //1为房源预订,2为服务预订,3为活动报名,4为发布房源
        orderId: "",
        orderType:"",
        thumb:"",
    },
    onLoad: function (e) {
        var that = this;
        that.setData({
            status: e.id,
            navH: app.globalData.navHeight,
        })
        if (e.id == '1') {
            that.setData({
                orderId: e.orderId,
                thumb:e.thumb
            })
        }else if(e.id == '2'){
            that.setData({
                orderId: e.orderId,
                thumb:e.thumb,
                orderType:e.orderType
            })
        }else if(e.id == '3'){
            that.setData({
                thumb:e.thumb
            })
        }
    },
    onShareAppMessage: function () {
        var that=this;
        if(that.data.status==1){
           var titleShow="精美房源";
        }else if(that.data.status==2){
            var titleShow="生活服务";
        }else{
            var titleShow="特色活动";
        }
        return {
            title: '我在「漫屿筱筑」成功预订'+titleShow+'，尽享花岛风情，邀你来试！',
            path: '/pages/index/index', 
            imageUrl: that.data.imgUrl+that.data.thumb
        }
    },
    navBack:function(){
        wx.switchTab({
            url: '../../index/index'
        })
    }
})
